package svc

import (
	"github.com/tal-tech/go-zero/zrpc"
	"go-zero-test/api/internal/config"
	"go-zero-test/rpc/transfrom/transformer"
)

type ServiceContext struct {
	Config config.Config
	Transformer transformer.Transformer                                          // 手动代码 rpc client
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		Transformer: transformer.NewTransformer(zrpc.MustNewClient(c.Transform)),  // 手动代码
	}
}
